package com.gzw.test;

import com.wgz.mcp.McpServerApplication;
import com.wgz.mcp.mapper.DepotHeadMapper;
import com.wgz.mcp.service.KnowledgeBaseService;
import com.zaxxer.hikari.HikariDataSource;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.sql.ResultSet;
import java.sql.Statement;

@SpringBootTest(classes = McpServerApplication.class)
public class McpTestCase {

    @Resource
    private KnowledgeBaseService knowledgeBaseService;

    @Resource
    private HikariDataSource hikariDataSource;

    @Test
    public void test0() throws Exception {
        String s = knowledgeBaseService.queryFromQdrant("请购单", 146l);
        System.out.println(s);
        Statement stmt = hikariDataSource.getConnection().createStatement();
        ResultSet resultSet = stmt.executeQuery("select 'abc';");
        resultSet.next();
        System.out.println(resultSet.getString(1));
    }

    @Test
    public void test1(){
        String s = knowledgeBaseService.updateOrderStatusFromQdrant("QGD00000000675", "已审核", 146l);
        System.out.println(s);
    }



}
